package com.qen.truelicense.license;


import com.qen.truelicense.util.ObfuscatedString;

/**
 * Thrown if and only if a license is to be verified using
 * {@link LicenseManager#verify()} and no license is installed.
 *
 * @author licz
 * @version 1.0.0
 */
public class NoLicenseInstalledException extends Exception {
    private static final long serialVersionUID = 1L;

    private static final String EXC_NO_LICENSE_INSTALLED = new ObfuscatedString(new long[] {0xA7153E06F5823271L, 0xE24A8DFE93118B0EL, 0x86DD9043D28B8AC4L, 0xE4428E0337101DFAL}).toString(); /* => "exc.noLicenseInstalled" */

    /**
     * Constructs an instance of {@code NoLicenseInstalled} for the
     * given licensing subject.
     *
     * @param subject The licensing subject as specified in
     *        {@link LicenseParam#getSubject()}
     *        - may <em>not</em> be {@code null}.
     */
    public NoLicenseInstalledException(String subject) {
        super(subject);
    }

    public String getLocalizedMessage() {
        return Resources.getString(EXC_NO_LICENSE_INSTALLED, super.getMessage());
    }
}
